﻿using System.Runtime.InteropServices;

namespace RoMBot.Classes
{
    public class Buff
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public float TimeLeft { get; set; }
        public int Level { get; set; }
        public int Count { get; set; }

        public override string ToString()
        {
            return string.Format( "Id: {0}, Name: {1}, TimeLeft: {2}, Level: {3}, Count: {4}", Id, Name, TimeLeft, Level, Count );
        }
    }

    [StructLayout( LayoutKind.Explicit, Pack = 1, Size = 0x54 )]
    public struct BuffStruct
    {
        [FieldOffset( Addresses.pawnBuffId_offset )]
        public int Id;

        [FieldOffset( Addresses.pawnBuffTimeLeft_offset )]
        public float TimeLeft;

        [FieldOffset( Addresses.pawnBuffLevel_offset )]
        public int Level;
    }
}
